package com.bw.ivideo.testmvi.state

import com.bw.ivideo.testmvi.model.entity.VideoEntity

/**
 * @Author : ZhouZiYao
 * @Time : On 2023/11/17 19:16
 * @Description : VideoState 状态
 */
sealed class VideoState{
    /**
     * 初始状态
     */
    object Init: VideoState()
    object Loading:VideoState(){
        override fun toString(): String {
            return "Loading"
        }
    }

    data class Success(val data: MutableList<VideoEntity>):VideoState(){
        override fun toString(): String {
            return "Success(videos=$data)"
        }
    }

    data class Error(val error: String):VideoState(){
        override fun toString(): String {
            return "Error(error=$error)"
        }
    }
}
